public class Solution {
    
    public boolean firstPlayWinning(String s1) {  
        return canWin(s1.toCharArray());  
    }  
    public boolean canWin(char[] cs) {  
        for(int i=0;i<cs.length-1;i++) {  
            if(cs[i] == cs[i+1] && cs[i]=='+') {  
                cs[i] = '-';  
                cs[i+1] = '-';  
                boolean win = !canWin(cs);  
                cs[i] = '+';  
                cs[i+1] = '+';  
                if(win) return true;  
            }  
        }  
        return false;  
    }  
    
}